#include "stdio.h"
#include "stdalign.h"

typedef struct Bar {
  int a;
  char b[129];
  int c;
} NewBar __attribute__((aligned(128)));

typedef struct Bar2 {
  int a;
  char b[129];
  int c;
} __attribute__((aligned(256))) NewBar2 __attribute__((aligned(128)));

struct Foo {
  struct Bar a;
  NewBar b;
};

struct Goo {
  NewBar b;
  struct Bar a;
};

int main() {
  struct Foo f;
  printf("Bar Size: %lu\n", sizeof(struct Bar));
  printf("Bar2 Size: %lu\n", sizeof(struct Bar2));
  printf("NewBar Size: %lu\n", sizeof(NewBar));
  printf("NewBar Aliign: %lu\n", sizeof(NewBar));
  printf("NewBar2 Size: %lu\n", sizeof(NewBar2));
  printf("NewBar2 Aliign: %lu\n", sizeof(NewBar2));
  printf("f.b Align: %lu\n", alignof(f.b));
  printf("Foo Size: %lu\n", sizeof(struct Foo));
  printf("Goo Size: %lu\n", sizeof(struct Goo));
  return 0;
}
